<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>返回值</title>
    <script>
        function getName() {
            return "togogo";
        }
        var name = getName();
        console.log(name);

        function getVal(id) {
            if (id==17){
                return "A";
            }if (id==18){
                return 10;
            }if (id==19){
                return true;
            }
        }
        var v = getVal(17);
        console.log(typeof(v) + "," + v);
        var v1 = getVal(18);
        console.log(typeof(v1) + "," + v1);
        var  v2 = getVal(19);
        console.log(typeof(v2)+ "," + v2)
    </script>
</head>
<body>

</body>
</html>